<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>时间的动态显示</title>
	</head>
	
	<body>
		<div id="myclock">
			<script>
		function showTime(){
			var today=new Date();
			var year=today.getFullYear();
			var month=today.getMonth();
			var day=today.getDate();
			var week=today.getDay();
			if(week==0){
				w="日";
			}else if(week==1){
				w="一";
			}else if(week==2){
				w="二";
			}else if(week==3){
				w="三";
			}else if(week==4){
				w="四";
			}else if(week==5){
				w="五";
			}else{
				w="六";
			}
			var hour=today.getHours();
			var minute=today.getMinutes();
			var miao=today.getSeconds();
			document.getElementById("myclock").innerHTML="现在是"+year+"年"+(month+1)+"月"+day+"日,星期"+w+hour+"时"+minute+"分"+miao+"秒";
		}
		showTime();
		</script>
		</div>	
	</body>
</html>
